(function(){
var onluy={DES:{}}
onluy.secretkey='e036hlqtculakx38tjw2u9gs';
//封包加解密 
onluy.DES.encrypt=function(message ) {   
	var key=onluy.secretkey;
	var keyHex = CryptoJS.enc.Utf8.parse(key);  
	var encrypted = CryptoJS.DES.encrypt(message, keyHex, {
		mode: CryptoJS.mode.ECB,
		padding: CryptoJS.pad.Pkcs7
	}); 
	return encrypted.toString();
} 

onluy.DES.decrypt=function(ciphertext) {   
	var key=onluy.secretkey;
	var keyHex = CryptoJS.enc.Utf8.parse(key); 
	var decrypted = CryptoJS.DES.decrypt({
		ciphertext: CryptoJS.enc.Base64.parse(ciphertext)
	}, keyHex, {
		mode: CryptoJS.mode.ECB,
		padding: CryptoJS.pad.Pkcs7
	}); 
	return decrypted.toString(CryptoJS.enc.Utf8);
} 
window.Onluy = onluy;
 
})();
